﻿#pragma once

#include "../MonsterObject.h"
#include "../../MirDatabase/MonsterInfo.h"
#include <vector>
#include <any>

using namespace Server::MirDatabase;
using namespace Server::MirEnvir;
namespace S = ServerPackets;

namespace Server::MirObjects::Monsters
{
    /// <summary>
    /// Attack1 - Basic melee attack
    /// Attack2 - Slam Attack (DC * 3)
    /// AttackRange1 - Lightning Group Attack (find all targets within 1 range of target and hit)
    /// Special Action - Gains a Lightning Magic Shield at various stages of HP (80-70% / 50-40% / 20-0%)
    /// Special Action 2 - Hits EVERYONE in range with a thunderbolt periodically (this is only when Energy Shield is up)
    /// Summons Slaves periodically
    /// </summary>

    class GeneralMeowMeow : public MonsterObject
    {
    public:
        long long SlaveSpawnTime = 0;
        int ShieldUpDuration = 0;
        long long ThunderAttackTime = 0;

    protected:
        virtual unsigned char getAttackRange() const;

        GeneralMeowMeow(MonsterInfo *info);

        bool InAttackRange() override;

        void Attack() override;

        void ProcessAI() override;

    public:
        void MassThunderAttack();

        void Spawned() override;

    protected:
        void CompleteAttack(std::vector<std::any> &data) override;

        void CompleteRangeAttack(std::vector<std::any> &data) override;

    private:
        void SpawnSlaves();

    protected:
        void ProcessTarget() override;
    };
}

